package com.wyvoid.forum.service.impl;

import com.wyvoid.forum.service.ISettingsService;
import com.wyvoid.forum.domain.Settings;
import com.wyvoid.forum.dao.ISettingsDAO;

import java.util.List;

/**
 * <p>51void.com</p>
 * User:cjp
 * Date: 2007-5-13
 * Time: 20:11:22
 */
public class SettingsService implements ISettingsService {
    private ISettingsDAO settingsDAO;

    public void setSettingsDAO(ISettingsDAO settingsDAO) {
        this.settingsDAO = settingsDAO;
    }

    public void addSettings(Settings settings) {
        settingsDAO.create(settings);
    }

    public void updateSettings(Settings settings) {
        settingsDAO.save(settings);
    }

    public List<Settings> getSettings() {
        return settingsDAO.findAll();
    }
}
